package com.qf.utils;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 * @author 10202
 * @version V1.0
 * @Project xiaomi
 * @Package com.qf.utils
 * @Date 2023/4/13 14:55
 */
public class MD5Utils {
    public static String md5(String s){
        try {
            MessageDigest md=MessageDigest.getInstance("md5");
            md.update(s.getBytes("utf-8"));
            byte[] data = md.digest();
            return new BigInteger(1,data).toString(16);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return null;
    }

}
